import QtQuick 2.14
import QtQuick.Controls 2.5
import Qt.labs.platform 1.0


Rectangle{
    id:filesave
    anchors.fill: parent
    Component.onCompleted: {
        console.log('===============================filsave')
    }
    Rectangle {
        id: inputBox
        border.color: "black"
        width: unit*4.2
        height: parent.height
        TextInput {
            id: inputBoxInput
            text: folderDialog.folder
            color: "#707070"
            font.pixelSize: 16
            activeFocusOnTab: true
            selectByMouse: true //是否可以选择文本
            selectedTextColor: "black" //设置选择文本的字体颜色
            selectionColor: "#4A6DBC" //设置选择框的颜色
            anchors.centerIn: parent
        }
    }

    Button{
        id: choiceBtn
        width: 1.3*unit
        height: parent.height
//        y:4.5*unit
        text: qsTr("选择路径")
        anchors.left: inputBox.right
        Component.onCompleted: {
            console.log('===================choiceBtn')
        }
        onClicked: {
            folderDialog.open()
        }
    }

    FolderDialog {
        id: folderDialog
        //默认打开Pictures文件夹
        folder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0]

    }
}



